#include "vendmach.h"

VendingMachine::VendingMachine(unsigned int _id, int _MaxCapacity) : id(_id), MaxCapacity(_MaxCapacity)
{
    currentDrink = new Drink[MaxCapacity];
    motor = new Motor[MaxCapacity];
    SelfTest(); // 自检
}

bool VendingMachine::SelfTest()
{
    cout << "Self Test" << endl;
    return true;
}

VendingMachine::~VendingMachine()
{
    delete[] currentDrink;
    delete[] motor;
}

void VendingMachine::Syn_price_info()
{
    cout << "Syn price info" << endl;
}

void VendingMachine::Syn_vending_records()
{
    cout << "Syn vending records" << endl;
}

void VendingMachine::add_drink(Drink *drink)
{
    cout << "Add drink" << endl;
}

void VendingMachine::remove_drink(int id)
{
    cout << "Remove drink" << endl;
}

void VendingMachine::buy_drink(int id, int num)
{
    cout << "Buy drink" << endl;
}